package com.neusoft.service;

import java.math.BigDecimal;
import java.util.List;

import com.neusoft.po.Credit;

public interface CreditService {
	// get total credit by userId
	public Integer getTotalCreditByUserId(String userId);

	// public List<Credit> getAvailableCreditByUserId(String userId);
	public List<Credit> listAvailableCreditByUserId(String userId);

	// get credit by userId
	public List<Credit> listAllCreditByUserId(String userId);

	// get credit by userId and channelType
	public List<Credit> listCreditByUserIdAndChannelType(String userId, int channelType);

	// 增加积分，传入兑换数值count
	public int insertCredit(Credit credit, BigDecimal count);

	// 消费积分，传入兑换数目count
	public int useCredit(Credit credit, BigDecimal count);

}
